def fn(self, name='world'):#定义函数
	print('Hello, %s.' % name)
	
Hello = type('Hello', (object,), dict(hello=fn))#创建Hello class

h = Hello()
print('call h.hello():')
h.hello()
print('type(Hello) =', type(Hello))
print('type(h)', type(h))